package com.example.kevin.controller;

import com.example.kevin.entity.User;
import com.example.kevin.resp.Resp;
import com.example.kevin.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author: Kevin
 * Date: 2023/4/11 9:53
 */
@RestController
@RequiredArgsConstructor
public class TestController {

    private final UserService userService;

    @PostMapping("test")
    public Resp test() {
        List<User> users = userService.getUsers();
        return Resp.succ(users);
    }
}
